package io.github.talelin.latticy.vo;

import io.github.talelin.latticy.model.BannerDO;
import io.github.talelin.latticy.model.BannerItemDO;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.util.List;

/**
 * @ClassName BannerWithItemsBO
 * @Description TODO
 * @Author wushaopei
 * @Date 2021/10/23 15:07
 * @Version 1.0
 */
@Data
@NoArgsConstructor
public class BannerWithItemsBO {

    private Long id;

    private String name;

    private String title;

    private String description;

    private String img;

    List<BannerItemDO> items;

    public BannerWithItemsBO(BannerDO bannerDO,List<BannerItemDO> bannerItemDOList){
        BeanUtils.copyProperties(bannerDO,this);
        this.setItems(bannerItemDOList);
    }
}
